﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WebApplicationHook
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Common" in code, svc and config file together.
    public class Common : ICommon
    {
        public void DoWork(byte[] bytes)
        {
            string fileName = Guid.NewGuid().ToString();

            var fs = new BinaryWriter(new FileStream(@"D:\\accordion\\" + fileName + ".jpeg", FileMode.Append, FileAccess.Write));
            fs.Write(bytes);
            fs.Close();
        }
    }
}
